“PS Extension” is a slightly modified version of the “Extension Shell" which appears elsewhere on this CD. The only significant difference between this printing extension and the “Extension Shell” sample is that this one overrides a PostScript imaging system message, whereas the other only overrides "universal" messages.
This printing extension adds a panel to the print dialog and makes your Macintosh beep every time a PostScript driver starts preparing a page on a printer (at GXDoPostScriptPageSetup time). The extension can be turned on and off through the print panel. It's turned on by default.
Note that this printing extension is only functional for PostScript printer drivers.
Additional Requirements for Overriding Imaging System Messages
When you override imaging-system-specific messages, like the GXDoPostScriptPageSetup message in this example, you must provide a 'post', 'rast', or 'vect' resource which contains the ID of a separate 'over' resource for the PostScript, raster, or vector messages you're overriding. (You can't have one 'over' resource containing both your universal and PostScript overrides, for example.)
The ID for the override mapping resource must be gxExtensionImagingOverrideSelectorID.
The 'post', 'rast', and 'vect' resource types are not declared in the QuickDraw GX interface files. You should declare them yourself like so:
// gxPostscriptPrinterType is defined as 'post',
// gxRasterPrinterType is defined as 'rast', and
// gxVectorPrinterType is defined as 'vect' in PrintingResTypes.h
type gxPostscriptPrinterType
{
integer; // ID of 'over' resource to use.
};
type gxRasterPrinterType as gxPostscriptPrinterType;
type gxVectorPrinterType as gxPostscriptPrinterType;
In PS Extension, we're overriding GXDoPostScriptPageSetup, so we use this 'post' resource: